package com.zq.service.impl;

import com.zq.po.UserPO;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class UserService {
    public UserPO queryUserByName(String username){
        if ("admin".equals(username))
            return new UserPO(1,username);
        return null;
    }
    public String getRoles(String username){
        return "user";
    }
    public List<String> getPermissions(String username){
        List<String> perms = new ArrayList<>();
        perms.add("user:add");
        perms.add("user:upate");
        return perms;
    }
}
